Segment2

interface Segment2<V : Vector2<V>> : Segment<V> (source)

Inheritors

Properties

Link copied to clipboard
abstract val end: V

Returns the end point of the segment.

Link copied to clipboard
abstract val start: V

Returns the start point of the segment.

Functions

Link copied to clipboard
open fun eq(other: Segment2<*>, equivalence: DoubleEquivalence = DEFAULT_DOUBLE_EQUIVALENCE): Boolean

Checks if this segment is equal to another segment, considering the order of points irrelevant.

Link copied to clipboard
open fun intersection(other: Segment2<*>, equivalence: DoubleEquivalence = DEFAULT_DOUBLE_EQUIVALENCE): IntersectionData<Vec2>

Compute the intersection of this segment with another segment.

Link copied to clipboard
open fun length(): Double

Get the length of the segment.

Link copied to clipboard
abstract fun reverse(): Segment2<V>

Reverses the segment, swapping its start and end points.

Link copied to clipboard
abstract fun transform(transformer: Transformer<V>): Segment2<V>

Applies a transformation to the endpoints of this segment.